<?php include '../public/header.php' ?>
<?php include '../public/header_public.php' ?>
<body class="laytp-container">
<div style="height: 45px"></div>
<div id="opt_nav">
</div>
<div id="dialog">
    <div class="page-title" id="page-title">
        <div class="page-title-con">
            <span class="title">费用报销支付记录</span>
            <div class="move_title"></div>
            <div class="page-title-opt-list">
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
</div>

<!--<div class="layui-card" id="search-form">-->
<!--    <div class="layui-card-body">-->
<!--        <form class="layui-form" id="TableSearchFormId" lay-filter="TableSearchForm" onkeydown="keyTableSearch('TableSearchForm', 'datalist')">-->
<!--            <div class="layui-form-item">-->
<!--                <div class="layui-row">-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">交易单号</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="jiaonum" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">交易金额</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="money" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">款项摘要</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="zhai" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">交易对象</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="faer" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">交易方式</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="daotype" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">交易日期</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" readonly name="dt" placeholder="请输入" autocomplete="off" class="layui-input bdate_sea_range_ymd">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">资金账户</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="accname" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <label class="layui-form-label">经办人</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input type="text" name="baner" placeholder="请输入" class="layui-input" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="layui-col-md3">-->
<!--                        <div class="layui-form-item search-div">-->
<!--                            <div class="layui-form-item layui-inline">-->
<!--                                <button class="laytp-btn laytp-btn-md laytp-btn-primary" id="TableSearchButton" type="button"><i class="layui-icon layui-icon-search"></i>查询</button>-->
<!--                                <button class="layui-btn layui-btn-primary" onclick="listTableReset()" id="TableSearchReset" type="reset" ><i class="layui-icon layui-icon-refresh"></i>重置</button>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </form>-->
<!--    </div>-->
<!--</div>-->

<div class="layui-card" id="table-card">
    <div class="layui-card-body">
        <div class="layui-row">
            <div class="layui-col-md12" id="table_list">
                <div class="layui-card-body">
                    <table id="datalist" lay-filter="datalist"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="test-dropdown-toolbar-barDemo">
    <div class="tab-list-authbut">
        <a href="javascript:;" class="bar_opt" onclick="auth_but_func_show('{{d.id}}')">查看</a>
        {{# if(param_my == 0){ }}
        <a href="javascript:;" class="bar_opt" onclick="auth_but_func_edit('{{d.id}}')">编辑</a>
        <a href="javascript:;" class="bar_opt" onclick="auth_but_func_delete('{{d.id}}')">删除</a>
        {{#} }}

    </div>
</script>
<script type="text/html" id="toolbarDemo">
    <div class = "layui-btn-container">
        <!--                <li class="layui-nav-item" onclick="auth_but_func_add('支付')">-->
        <!--                    <button class="layui-btn layui-btn-primary outbut">-->
        <!--                        <i class="layui-icon layui-icon-add-1"></i>支付-->
        <!--                    </button>-->
        <!--                </li>-->
    </div>
</script>

<script>
    var param_mid = getQueryVariable('id') || 0;
    var param_my = getQueryVariable('my') || 0;
    layui.use(["laytp",'laypage','table','dropdown','form','soulTable'], function () {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable;
        $("#search_table").hide();
        setSouTableExport('费用报销支付记录');
        var mytable = table.render({
            elem: "#datalist",id: "datalist"
            ,url: facade.url(ask_payment_bao_kuan_detail_list),where: {mid:param_mid}, page: true
            ,soulSort: TabInit.soulSort,method: TabInit.method, toolbar: TabInit.toolbar, overflow: TabInit.overflow
            ,defaultToolbar: TabInit.defaultToolbar,filter: TabInit.filter
            ,request: TabInit.request,response: TabInit.response,contextmenu:get_table_contextmenu(soulTable)
            ,parseData: function (res) {

                render_from();
                return {
                    "code": res.code,
                    "msg": res.message,
                    "count": res.data.data.total,
                    "data": res.data.data.data
                };
            }
            , cols: [[
                {type: "checkbox", fixed: 'left'}
                ,{type:'numbers',title:'序号',fixed:'left'}
                ,{field: 'jiaonum', title: '交易单号'}
                ,{field: 'money', title: '交易金额(元)'}
                ,{field: 'budid_name', title: '款项科目'}
                ,{field: 'zhai', title: '款项摘要'}
                ,{field: 'faer', title: '交易对象'}
                ,{field: 'daotype', title: '交易方式'}
                ,{field: 'dt', title: '交易日期'}
                ,{field: 'accname', title: '资金账户'}
                ,{field: 'baner', title: '经办人'}
                ,{fixed: 'right', title:'操作', toolbar: '#test-dropdown-toolbar-barDemo',align:'center',width:200}
            ]]
            , done: function (res) {
                soulTable.render(this);
            }
        });


        listTableSearch(form, table);
    });

    function auth_but_func_show(id){
        openPage('../account_shou/show.php?id='+id);
    }
    function auth_but_func_add(){
        openPageEdit('add_pay.php?close=1&id='+param_mid);
    }
    function auth_but_func_edit(id){
        openPageEdit('edit_pay.php?close=1&id='+id);
    }
    function auth_but_func_delete(id){
        data_delete(ask_payment_bao_kuan_del, {id:id});
    }

</script>
</body>
</html>
